import { LOGIN_TOKEN, LOGOUT } from "../constants"
const initialState = ""

const login = (state = initialState, action) => {
  switch (action.type) {
    case LOGIN_TOKEN:
      return action.payload
    case LOGOUT:
      return initialState
    default:
      return state
  }
}

export default login
